package worldinruin.core.imp.buildings;

import java.io.Serializable;

import worldinruin.core.IResourceBuilding;
import worldinruin.core.IResources;
import worldinruin.core.ITile;
import worldinruin.core.IType;
import worldinruin.core.imp.Resources;



public class Farm implements IResourceBuilding, Serializable {
	
	
	private static final long serialVersionUID = 5035619917590494336L;
	private String name;
	private ITile tile;
	private IType buildingType;
	private IResources price;
	private IResources productionRate;
	private String buildingDescription;
	
	/**
	 * Creates a farm.
	 */
	public Farm() {
		name = "Farm";
		buildingType = BuildingTypes.FARM;
		price = new Resources(50, 10, 10, 10);
		productionRate = new Resources(50, 0, 0, 0);
		buildingDescription = "This building is a farm. Here you store food.";
	}
	
	/**
	 * Creates a farm on the tile.
	 * @param tile Tile position on gameboard.
	 */
	public Farm(ITile tile) {
		this();
		this.tile = tile;
	}
	
	@Override
	public String getName() {
		return name;
	}
	
	@Override
	public ITile getTile() {
		return tile;
	}
	
	@Override
	public IResources getPrice() {
		return price;
	}

	@Override
	public IResources getProductionRate() {
		return productionRate;
	}
	
	@Override
	public IType getBuildingType() {
		return buildingType;
	}
	
	@Override
	public String getBuildingDescription(){
		return buildingDescription;
	}
}
